<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // Set 类似数组，成员值唯一 
        // 使用场景：数组去重
        var arr = [1, 2, 3, 3, 2, 22, 33, 11, 11, 2];
        // console.log( new Set(arr) )
        console.log(Array.from(new Set(arr)))



        // Map 类似对象，key 可以为任何数据类型

        var m = new Map();
        var k = true;
        var v = 123;
        m.set(k, v);
        console.log(m)

    </script>
</body>

</html>